FROM ubuntu/squid:latest

COPY ./docker-entrypoint.sh /docker-entrypoint.sh
RUN sed -i 's/\r$$//' /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh

COPY ./squid.conf.template /etc/squid/squid.conf.template

##CAE_COMMON_VARS_PLACE_HOLDER##

##DIFY_COMMON_VARS_PLACE_HOLDER##

ENV HTTP_PORT=${SSRF_HTTP_PORT:-3128} \
    COREDUMP_DIR=${SSRF_COREDUMP_DIR:-/var/spool/squid} \
    REVERSE_PROXY_PORT=${SSRF_REVERSE_PROXY_PORT:-8194} \
    SANDBOX_HOST=${SSRF_SANDBOX_HOST:-sandbox} \
    SANDBOX_PORT=${SANDBOX_PORT:-8194}

ENTRYPOINT [ "/docker-entrypoint.sh" ]